-
Notifications
You must be signed in to change notification settings - Fork 8.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature: multi-version seata protocol support #6226
Conversation
…v-complete-v1 # Conflicts: # core/src/main/java/org/apache/seata/core/rpc/netty/v1/ProtocolDecoderV1.java
…ialize-version # Conflicts: # core/src/main/java/org/apache/seata/core/rpc/netty/v1/ProtocolV1Decoder.java # core/src/main/java/org/apache/seata/core/serializer/SerializerServiceLoader.java
…nto dev-mlv-complete-v1 # Conflicts: # core/src/main/java/org/apache/seata/core/rpc/netty/v1/ProtocolDecoderV1.java
…plete-v1 # Conflicts: # core/src/main/java/org/apache/seata/core/rpc/netty/AbstractNettyRemotingServer.java # core/src/main/java/org/apache/seata/core/rpc/netty/v1/ProtocolDecoderV1.java # core/src/main/java/org/apache/seata/core/rpc/netty/v1/ProtocolEncoderV1.java # core/src/main/java/org/apache/seata/core/serializer/SerializerServiceLoader.java # serializer/seata-serializer-seata/src/main/java/org/apache/seata/serializer/seata/SeataSerializer.java
* <li>Body Length: Full Length - Head Length</li> | ||
* </p> | ||
*/ | ||
public class CompatibleProtocolEncoder extends MessageToByteEncoder { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be renamed MultiProtocolEncoder
@@ -35,6 +35,8 @@ public class RpcMessage implements Serializable { | |||
private Map<String, String> headMap = new HashMap<>(); | |||
private Object body; | |||
|
|||
private String otherSideVersion; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
为什么要在rpcmessage中增加版本字段?
Why add a version field to rpcmessage?
} | ||
|
||
|
||
private RpcMessage buildResponseMessage(Channel channel, RpcMessage fromRpcMessage, Object msg, byte messageType) { | ||
RpcMessage rpcMessage = super.buildResponseMessage(fromRpcMessage, msg, messageType); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
为什么不能直接通过channel上下文中的版本去创建对应协议版本的子类?
Why can't I create a subclass of the corresponding protocol version directly from the version in the channel context?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Ⅰ. Describe what this PR did
multi-version protocol support
#5628
前置PR(front PR):
#6208
#6209
Ⅱ. Does this pull request fix one issue?
fixes #6225
Ⅲ. Why don't you add test cases (unit test/integration test)?
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews